package com.xinyue.design.strategy.wayOne;

public class Client {

	public static void main(String[] args) throws Exception {
		PriceStrategy big = new StrategyBig();
	    PriceStrategy small = new StrategySmall();
	    //业务拓展对象
	    PriceStrategy credit = new StrategyCredit();
	    
	    PriceContext pcbig = new PriceContext(3000, 0, big);
	    System.out.println("大客户9折优惠价：     " + pcbig.pay());
	    
	    PriceContext pcsmall = new PriceContext(3000, 0, small);
	    System.out.println("小客户9.5折优惠价：" + pcsmall.pay());
	    
	    //总价格=客户折扣价(9.8折)-付款率优惠价格
	    PriceContext pccredit = new PriceContext(3000, 0.8, credit);
	    System.out.println("差信誉客户优惠价：   " + pccredit.pay());
	    
	    
	}
}
